package com.hspedu.homework.homework10;

/**
 * @author 谷其昊
 * @version 1.0
 * @date 2022/1/24
 * @time 19:50
 */
public class Doctor {
    private String name;
    private int age;
    private String job;
    private String gender;
    private double sal;

    @Override
    public boolean equals(Object object){
        if (this == object){
            return true;
        }

        if (object instanceof Doctor){
            Doctor doctor = (Doctor) object;
            if (this.age == doctor.age
            && this.name.equals(doctor.name)
            && this.job.equals(doctor.job)
            && this.gender.equals(doctor.gender)
            && this.sal == doctor.sal){
                return true;
            }
        }
        return false;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getJob() {
        return job;
    }

    public void setJob(String job) {
        this.job = job;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public double getSal() {
        return sal;
    }

    public void setSal(double sal) {
        this.sal = sal;
    }

    public Doctor(String name, int age, String job, String gender, double sal) {
        this.name = name;
        this.age = age;
        this.job = job;
        this.gender = gender;
        this.sal = sal;
    }
}
